package xxxx.dao;

import xxxx.entities.db.DaoResult;
import xxxx.utility.JsonUtility;


/**
 * Created by liwei.b on 2017/4/26.
 */
public class FreeReadingDao extends BaseDao {

    public DaoResult add(XXXXX xxxxx) {
        DaoResult tmpResult = new DaoResult(DBError, null);
        try {
            IFreeReadingDao mapper = CustomMapperFactory.FreshMan.createMapper(IFreeReadingDao.class);
            int effectedLines = mapper.add(xxxxx);
            tmpResult.setErrorCode(0);
        } catch (Exception ex) {
            tmpResult.setErrorCode(DBException);
            tmpResult.setErrorMessage(JsonUtility.toJson(ex));
        }
        return tmpResult;
    }

}
